<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/7/4
  Time: 10:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--<html>--%>
<%--<head>--%>
<%--<title>Title</title>--%>
<%--</head>--%>
<%--<body>--%>
<%--<form action="doLogin.jsp" method="post">--%>
<%--<input type="hidden" name="country" value="中国"><br/>--%>
<%--昵称:<input type="text" name="nickName"/><br/>--%>
<%--密码: <input type="password" name="pwd"/> <br/>--%>
<%--<input type="submit" value="登录"/>--%>
<%--</form>--%>
<%--<span>--%>
<%--<%--%>
<%--String msg = (String) request.getAttribute("msg");--%>

<%--%>--%>
<%--<%=msg == null ? "" : msg--%>
<%--%>--%>

<%--</span>--%>
<%--</body>--%>
<%--</html>--%>


<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>学生管理系统</title>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body class="login_bg">
<section class="loginBox">
    <header class="loginHeader">
        <h1>学生管理系统</h1>
    </header>
    <section class="loginCont">
        <%
            if (session.getAttribute("USER_LOGIN") != null) {
                out.print("您已经登录，无需再次登录!<a href='welcome.jsp'>返回首页</a>");
            } else {
        %>
        <form class="loginForm" action="doLogin.jsp">
            <div class="inputbox">
                <label for="loginname">用户名：</label>
                <input id="loginname" type="text" name="loginname" placeholder="请输入用户名" required/>
            </div>
            <div class="inputbox">
                <label for="pwd">密码：</label>
                <input id="pwd" type="password" name="pwd" placeholder="请输入密码" required/>
            </div>
            <div class="subBtn">
                <input type="submit" value="登录"/>
                <input type="reset" value="重置"/>
                <br/>
                &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp; <a href="addAdmin.jsp" style="border: none" >管理员注册</a>
            </div>

        </form>


        <%
            }
        %>
        <span>
    <%
        String msg = (String) request.getAttribute("msg");

    %>
    <%=msg == null ? "" : msg
    %>

</span>
    </section>
</section>
<script>
    if (self != parent) {
        parent.location = self.location;
    }
</script>
</body>
</html>